Integrand size = 29, antiderivative size = 398 \[ \int \frac {1}{\sqrt {a+b \sec (e+f x)} \sqrt {c+d \sec (e+f x)}} \, dx=-\frac {2 \sqrt {c+d} \cot (e+f x) \operatorname {EllipticPi}\left (\frac {a (c+d)}{(a+b) c},\arcsin \left (\frac {\sqrt {a+b} \sqrt {c+d \sec (e+f x)}}{\sqrt {c+d} \sqrt {a+b \sec (e+f x)}}\right ),\frac {(a-b) (c+d)}{(a+b) (c-d)}\right ) \sqrt {-\frac {(b c-a d) (1-\sec (e+f x))}{(c+d) (a+b \sec (e+f x))}} \sqrt {\frac {(b c-a d) (1+\sec (e+f x))}{(c-d) (a+b \sec (e+f x))}} (a+b \sec (e+f x))}{a \sqrt {a+b} c f}-\frac {2 b \sqrt {a+b} \cot (e+f x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {c+d} \sqrt {a+b \sec (e+f x)}}{\sqrt {a+b} \sqrt {c+d \sec (e+f x)}}\right ),\frac {(a+b) (c-d)}{(a-b) (c+d)}\right ) \sqrt {\frac {(b c-a d) (1-\sec (e+f x))}{(a+b) (c+d \sec (e+f x))}} \sqrt {-\frac {(b c-a d) (1+\sec (e+f x))}{(a-b) (c+d \sec (e+f x))}} (c+d \sec (e+f x))}{a \sqrt {c+d} (b c-a d) f} \]
[Out]
Time = 0.50 (sec) , antiderivative size = 398, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {4023, 4021, 4069} \[ \int \frac {1}{\sqrt {a+b \sec (e+f x)} \sqrt {c+d \sec (e+f x)}} \, dx=-\frac {2 b \sqrt {a+b} \cot (e+f x) (c+d \sec (e+f x)) \sqrt {\frac {(b c-a d) (1-\sec (e+f x))}{(a+b) (c+d \sec (e+f x))}} \sqrt {-\frac {(b c-a d) (\sec (e+f x)+1)}{(a-b) (c+d \sec (e+f x))}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {c+d} \sqrt {a+b \sec (e+f x)}}{\sqrt {a+b} \sqrt {c+d \sec (e+f x)}}\right ),\frac {(a+b) (c-d)}{(a-b) (c+d)}\right )}{a f \sqrt {c+d} (b c-a d)}-\frac {2 \sqrt {c+d} \cot (e+f x) (a+b \sec (e+f x)) \sqrt {-\frac {(b c-a d) (1-\sec (e+f x))}{(c+d) (a+b \sec (e+f x))}} \sqrt {\frac {(b c-a d) (\sec (e+f x)+1)}{(c-d) (a+b \sec (e+f x))}} \operatorname {EllipticPi}\left (\frac {a (c+d)}{(a+b) c},\arcsin \left (\frac {\sqrt {a+b} \sqrt {c+d \sec (e+f x)}}{\sqrt {c+d} \sqrt {a+b \sec (e+f x)}}\right ),\frac {(a-b) (c+d)}{(a+b) (c-d)}\right )}{a c f \sqrt {a+b}} \]
[In]
[Out]
Rule 4021
Rule 4023
Rule 4069
Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {c+d \sec (e+f x)}} \, dx}{a}-\frac {b \int \frac {\sec (e+f x)}{\sqrt {a+b \sec (e+f x)} \sqrt {c+d \sec (e+f x)}} \, dx}{a} \\ & = -\frac {2 \sqrt {c+d} \cot (e+f x) \operatorname {EllipticPi}\left (\frac {a (c+d)}{(a+b) c},\arcsin \left (\frac {\sqrt {a+b} \sqrt {c+d \sec (e+f x)}}{\sqrt {c+d} \sqrt {a+b \sec (e+f x)}}\right ),\frac {(a-b) (c+d)}{(a+b) (c-d)}\right ) \sqrt {-\frac {(b c-a d) (1-\sec (e+f x))}{(c+d) (a+b \sec (e+f x))}} \sqrt {\frac {(b c-a d) (1+\sec (e+f x))}{(c-d) (a+b \sec (e+f x))}} (a+b \sec (e+f x))}{a \sqrt {a+b} c f}-\frac {2 b \sqrt {a+b} \cot (e+f x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {c+d} \sqrt {a+b \sec (e+f x)}}{\sqrt {a+b} \sqrt {c+d \sec (e+f x)}}\right ),\frac {(a+b) (c-d)}{(a-b) (c+d)}\right ) \sqrt {\frac {(b c-a d) (1-\sec (e+f x))}{(a+b) (c+d \sec (e+f x))}} \sqrt {-\frac {(b c-a d) (1+\sec (e+f x))}{(a-b) (c+d \sec (e+f x))}} (c+d \sec (e+f x))}{a \sqrt {c+d} (b c-a d) f} \\ \end{align*}
Result contains complex when optimal does not.
Time = 3.14 (sec) , antiderivative size = 249, normalized size of antiderivative = 0.63 \[ \int \frac {1}{\sqrt {a+b \sec (e+f x)} \sqrt {c+d \sec (e+f x)}} \, dx=\frac {4 i \cos ^2\left (\frac {1}{2} (e+f x)\right ) \sqrt {\frac {b+a \cos (e+f x)}{(a+b) (1+\cos (e+f x))}} \sqrt {\frac {d+c \cos (e+f x)}{(c+d) (1+\cos (e+f x))}} \left (\operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (e+f x)\right )\right ),\frac {(a+b) (c-d)}{(a-b) (c+d)}\right )-2 \operatorname {EllipticPi}\left (-\frac {a+b}{a-b},i \text {arcsinh}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (e+f x)\right )\right ),\frac {(a+b) (c-d)}{(a-b) (c+d)}\right )\right ) \sec (e+f x)}{\sqrt {\frac {-a+b}{a+b}} f \sqrt {a+b \sec (e+f x)} \sqrt {c+d \sec (e+f x)}} \]
[In]
[Out]
Time = 13.40 (sec) , antiderivative size = 263, normalized size of antiderivative = 0.66
method | result | size |
default | \(\frac {2 \sqrt {a +b \sec \left (f x +e \right )}\, \sqrt {c +d \sec \left (f x +e \right )}\, \sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {d +c \cos \left (f x +e \right )}{\left (c +d \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \left (\operatorname {EllipticF}\left (\sqrt {\frac {a -b}{a +b}}\, \left (\cot \left (f x +e \right )-\csc \left (f x +e \right )\right ), \sqrt {\frac {\left (a +b \right ) \left (c -d \right )}{\left (a -b \right ) \left (c +d \right )}}\right )-2 \operatorname {EllipticPi}\left (\sqrt {\frac {a -b}{a +b}}\, \left (\cot \left (f x +e \right )-\csc \left (f x +e \right )\right ), -\frac {a +b}{a -b}, \frac {\sqrt {\frac {c -d}{c +d}}}{\sqrt {\frac {a -b}{a +b}}}\right )\right ) \left (\cos \left (f x +e \right )^{2}+\cos \left (f x +e \right )\right )}{f \sqrt {\frac {a -b}{a +b}}\, \left (d +c \cos \left (f x +e \right )\right ) \left (b +a \cos \left (f x +e \right )\right )}\) | \(263\) |
[In]
[Out]
Timed out. \[ \int \frac {1}{\sqrt {a+b \sec (e+f x)} \sqrt {c+d \sec (e+f x)}} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {1}{\sqrt {a+b \sec (e+f x)} \sqrt {c+d \sec (e+f x)}} \, dx=\int \frac {1}{\sqrt {a + b \sec {\left (e + f x \right )}} \sqrt {c + d \sec {\left (e + f x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {1}{\sqrt {a+b \sec (e+f x)} \sqrt {c+d \sec (e+f x)}} \, dx=\int { \frac {1}{\sqrt {b \sec \left (f x + e\right ) + a} \sqrt {d \sec \left (f x + e\right ) + c}} \,d x } \]
[In]
[Out]
\[ \int \frac {1}{\sqrt {a+b \sec (e+f x)} \sqrt {c+d \sec (e+f x)}} \, dx=\int { \frac {1}{\sqrt {b \sec \left (f x + e\right ) + a} \sqrt {d \sec \left (f x + e\right ) + c}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {1}{\sqrt {a+b \sec (e+f x)} \sqrt {c+d \sec (e+f x)}} \, dx=\int \frac {1}{\sqrt {a+\frac {b}{\cos \left (e+f\,x\right )}}\,\sqrt {c+\frac {d}{\cos \left (e+f\,x\right )}}} \,d x \]
[In]
[Out]